<?php
include('config.php');
if($_POST)
{

$q=$_POST['searchword'];

$sql_res=mysql_query("select * from tbl_student  where stu_name  like '%$q%' order by stu_name LIMIT 5");
while($row=mysql_fetch_array($sql_res))
{
$stu_name=$row['stu_name'];
//$lname=$row['lname'];
//$img=$row['img'];
//$country=$row['country'];

$re_stu_name='<b>'.$q.'</b>';
//$re_lname='<b>'.$q.'</b>';

$final_stu_name = str_ireplace($q, $re_stu_name, $stu_name);

//$final_lname = str_ireplace($q, $re_lname, $lname);


?>
<div class="display_box" align="left">
    
   
<?php 
 echo '<a href="search/'.$stu_name.'">' . $final_stu_name.'</a>';

?>
</div>



<?php
}

}
else
{

}


?>
